package com.learn.mvc.converter;

import com.learn.mvc.entity.Address;
import org.springframework.core.convert.converter.Converter;

public class AddressConverter implements Converter<String, Address> {
    @Override
    public Address convert(String source) {
        String[] split = source.split(",");
        Address address = new Address(split[0], split[1], split[2]);
        return address;
    }
}
